package com.zp.soft2.StudentManagementSystem;

import java.util.Scanner;

public class StudentManagerDemo03 {
    StudentService studentService = new StudentService();
    Scanner scanner = new Scanner(System.in);


    public static void main(String[] args) {
        StudentManagerDemo03 studentManagerDemo03 = new StudentManagerDemo03();
        studentManagerDemo03.inte();
    }


    private void inte(){
        while (true){

            System.out.println("选择1录入学生信息");
            System.out.println("选择0退出并打印学生信息");

            int choie = scanner.nextInt();
            if (choie == 1) {
                studentService.add();
            }else if (choie == 0){
                studentService.printStudent();
                scanner.close();
                break;
            }else{
                System.out.println("输入错误，请重新输入");
            }

        }
    }



}
